package 慕课网.homework4;

public final class waxberry extends Fruits {
    private String color;
    public waxberry(){

    }
    public waxberry(String shape,String taste,String color){
        super(shape,taste);
        this.setColor(color);
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }
    public final  String face(){
        return "杨梅："+this.getColor()+"，"+this.getShape()+"，果味酸甜适中。";
    }

    @Override
    public void eat() {
        System.out.println("杨梅酸甜适中，非常好吃！");
    }

    @Override
    public String toString() {
        return "杨梅的信息：果实为"
                +this.getShape()+"，"
                +this.getColor()+"，"
                +this.getTaste()+"，非常好吃！";

    }
}
